\hypertarget{class_zebulon_1_1_mini_s_s_c}{
\section{Zebulon::MiniSSC Class Reference}
\label{class_zebulon_1_1_mini_s_s_c}\index{Zebulon::MiniSSC@{Zebulon::MiniSSC}}
}


Interface class for talking to a Mini SSC Servo Board over a serial port. Also supports automatic mixing for speed/steering type commands.  


{\ttfamily \#include $<$minissc.h$>$}\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_zebulon_1_1_mini_s_s_c_a3f0cb9fcce6682dba2fb8662c016e20c}{
\hyperlink{class_zebulon_1_1_mini_s_s_c_a3f0cb9fcce6682dba2fb8662c016e20c}{MiniSSC} ()}
\label{class_zebulon_1_1_mini_s_s_c_a3f0cb9fcce6682dba2fb8662c016e20c}

\begin{DoxyCompactList}\small\item\em Constructor, initializes default values. \item\end{DoxyCompactList}\item 
\hypertarget{class_zebulon_1_1_mini_s_s_c_a883cbc4d2092b4c32231d54b807e6f8d}{
\hyperlink{class_zebulon_1_1_mini_s_s_c_a883cbc4d2092b4c32231d54b807e6f8d}{$\sim$MiniSSC} ()}
\label{class_zebulon_1_1_mini_s_s_c_a883cbc4d2092b4c32231d54b807e6f8d}

\begin{DoxyCompactList}\small\item\em Destructor. \item\end{DoxyCompactList}\item 
bool \hyperlink{class_zebulon_1_1_mini_s_s_c_a9fcfaa277435c32db065d2ebe06308f0}{Initialize} (const std::string \&port, const unsigned int delay=20, const unsigned int reversed=0)
\begin{DoxyCompactList}\small\item\em Initializes serial connection to Mini SSC and creates thread that continuously writes to serial port. \item\end{DoxyCompactList}\item 
\hypertarget{class_zebulon_1_1_mini_s_s_c_a3d2a64d62a2f838bc1977d47581e639d}{
void \hyperlink{class_zebulon_1_1_mini_s_s_c_a3d2a64d62a2f838bc1977d47581e639d}{Shutdown} ()}
\label{class_zebulon_1_1_mini_s_s_c_a3d2a64d62a2f838bc1977d47581e639d}

\begin{DoxyCompactList}\small\item\em Shuts down interface. \item\end{DoxyCompactList}\item 
void \hyperlink{class_zebulon_1_1_mini_s_s_c_ac433ea01c88c1c75cc9d78caf8d95ba3}{SetChannelToRate} (const unsigned int channel, const bool onFlag=true)
\begin{DoxyCompactList}\small\item\em Normally when you set the value for a channel it will output that value directy (like a position). Use this method if you want this interface to use the value as a continuous rate change. \item\end{DoxyCompactList}\item 
bool \hyperlink{class_zebulon_1_1_mini_s_s_c_a8dd7043fbecde7a71e9c2187893c5603}{SetValue} (const unsigned int channel, const double value)
\begin{DoxyCompactList}\small\item\em Sets the value of an output channel. \item\end{DoxyCompactList}\item 
double \hyperlink{class_zebulon_1_1_mini_s_s_c_a730327053a20509c4e75bac6bd6f6ea6}{GetValue} (const unsigned int channel) const 
\begin{DoxyCompactList}\small\item\em Gets the value being sent to a specific output channel. \item\end{DoxyCompactList}\item 
bool \hyperlink{class_zebulon_1_1_mini_s_s_c_a622553c9d103c9c9af19984dd03d984c}{AddChannel} (const unsigned int channel)
\begin{DoxyCompactList}\small\item\em Adds channels that you want to use. \item\end{DoxyCompactList}\item 
bool \hyperlink{class_zebulon_1_1_mini_s_s_c_a00350ba4575d01fee9d074cb5ab643e4}{AddMixer} (const unsigned int channelX, const unsigned int channelY, const unsigned int channelA, const unsigned int chanelB)
\begin{DoxyCompactList}\small\item\em Creates two virtual channels that can be mixed to greate ouputs to two physical channels.Example virtual channel 8 (speed) and virtual channel 9 (turning) output to channel 0 (left motor) and 1 (right motor). \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_zebulon_1_1_mini_s_s_c_a873fe2cc0d93a57370a89e87dd5ecd07}{
static const unsigned int {\bfseries MaxChannel} = 12}
\label{class_zebulon_1_1_mini_s_s_c_a873fe2cc0d93a57370a89e87dd5ecd07}

\item 
\hypertarget{class_zebulon_1_1_mini_s_s_c_a9996d62cc9e8cd4ae07902758030ac71}{
static const unsigned int {\bfseries MaxMixer} = 4}
\label{class_zebulon_1_1_mini_s_s_c_a9996d62cc9e8cd4ae07902758030ac71}

\item 
\hypertarget{class_zebulon_1_1_mini_s_s_c_aaec4f7b408ba8647c5d3df8d5192d986}{
static const unsigned int {\bfseries ChannelLimit} = 16}
\label{class_zebulon_1_1_mini_s_s_c_aaec4f7b408ba8647c5d3df8d5192d986}

\item 
\hypertarget{class_zebulon_1_1_mini_s_s_c_af35150d896fef0bc9bd4f9e02a6c38c1}{
static const unsigned int {\bfseries MaxRateChange} = 180}
\label{class_zebulon_1_1_mini_s_s_c_af35150d896fef0bc9bd4f9e02a6c38c1}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
Interface class for talking to a Mini SSC Servo Board over a serial port. Also supports automatic mixing for speed/steering type commands. 

\subsection{Member Function Documentation}
\hypertarget{class_zebulon_1_1_mini_s_s_c_a622553c9d103c9c9af19984dd03d984c}{
\index{Zebulon::MiniSSC@{Zebulon::MiniSSC}!AddChannel@{AddChannel}}
\index{AddChannel@{AddChannel}!Zebulon::MiniSSC@{Zebulon::MiniSSC}}
\subsubsection[{AddChannel}]{\setlength{\rightskip}{0pt plus 5cm}bool MiniSSC::AddChannel (const unsigned int {\em channel})}}
\label{class_zebulon_1_1_mini_s_s_c_a622553c9d103c9c9af19984dd03d984c}


Adds channels that you want to use. 
\begin{DoxyParams}{Parameters}
\item[\mbox{$\leftarrow$} {\em channel}]Channel to get the value for. Values \mbox{[}0,7\mbox{]} mapped to specific output channels, values \mbox{[}8,15\mbox{]} are virtual channels used for mixing.\end{DoxyParams}
\begin{DoxyReturn}{Returns}
True on success, False on failure. 
\end{DoxyReturn}
\hypertarget{class_zebulon_1_1_mini_s_s_c_a00350ba4575d01fee9d074cb5ab643e4}{
\index{Zebulon::MiniSSC@{Zebulon::MiniSSC}!AddMixer@{AddMixer}}
\index{AddMixer@{AddMixer}!Zebulon::MiniSSC@{Zebulon::MiniSSC}}
\subsubsection[{AddMixer}]{\setlength{\rightskip}{0pt plus 5cm}bool MiniSSC::AddMixer (const unsigned int {\em channelX}, \/  const unsigned int {\em channelY}, \/  const unsigned int {\em channelA}, \/  const unsigned int {\em channelB})}}
\label{class_zebulon_1_1_mini_s_s_c_a00350ba4575d01fee9d074cb5ab643e4}


Creates two virtual channels that can be mixed to greate ouputs to two physical channels.Example virtual channel 8 (speed) and virtual channel 9 (turning) output to channel 0 (left motor) and 1 (right motor). 
\begin{DoxyParams}{Parameters}
\item[\mbox{$\leftarrow$} {\em channelX}]Virtual channel to create \mbox{[}8-\/15\mbox{]}. \item[\mbox{$\leftarrow$} {\em channelY}]Virtual channel to create \mbox{[}8-\/15\mbox{]}. \item[\mbox{$\leftarrow$} {\em channelA}]Physical channel to map to \mbox{[}0-\/7\mbox{]}. \item[\mbox{$\leftarrow$} {\em channelB}]Physical channel to map to \mbox{[}0-\/7\mbox{]}.\end{DoxyParams}
\begin{DoxyReturn}{Returns}
True on success, False on failure. 
\end{DoxyReturn}
\hypertarget{class_zebulon_1_1_mini_s_s_c_a730327053a20509c4e75bac6bd6f6ea6}{
\index{Zebulon::MiniSSC@{Zebulon::MiniSSC}!GetValue@{GetValue}}
\index{GetValue@{GetValue}!Zebulon::MiniSSC@{Zebulon::MiniSSC}}
\subsubsection[{GetValue}]{\setlength{\rightskip}{0pt plus 5cm}double MiniSSC::GetValue (const unsigned int {\em channel}) const}}
\label{class_zebulon_1_1_mini_s_s_c_a730327053a20509c4e75bac6bd6f6ea6}


Gets the value being sent to a specific output channel. 
\begin{DoxyParams}{Parameters}
\item[\mbox{$\leftarrow$} {\em channel}]Channel to get the value for. Values \mbox{[}0,7\mbox{]} mapped to specific output channels, values \mbox{[}8,15\mbox{]} are virtual channels used for mixing.\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Value being sent out on a channel. 
\end{DoxyReturn}
\hypertarget{class_zebulon_1_1_mini_s_s_c_a9fcfaa277435c32db065d2ebe06308f0}{
\index{Zebulon::MiniSSC@{Zebulon::MiniSSC}!Initialize@{Initialize}}
\index{Initialize@{Initialize}!Zebulon::MiniSSC@{Zebulon::MiniSSC}}
\subsubsection[{Initialize}]{\setlength{\rightskip}{0pt plus 5cm}bool MiniSSC::Initialize (const std::string \& {\em port}, \/  const unsigned int {\em delay} = {\ttfamily 20}, \/  const unsigned int {\em reversed} = {\ttfamily 0})}}
\label{class_zebulon_1_1_mini_s_s_c_a9fcfaa277435c32db065d2ebe06308f0}


Initializes serial connection to Mini SSC and creates thread that continuously writes to serial port. 
\begin{DoxyParams}{Parameters}
\item[\mbox{$\leftarrow$} {\em port}]Name of serial port to connect to. Example \char`\"{}/dev/ttyS1\char`\"{} \item[\mbox{$\leftarrow$} {\em delay}]How long to wait between writes to serial port in milliseconds.\end{DoxyParams}
\begin{DoxyReturn}{Returns}
True on success, False on failure. 
\end{DoxyReturn}
\hypertarget{class_zebulon_1_1_mini_s_s_c_ac433ea01c88c1c75cc9d78caf8d95ba3}{
\index{Zebulon::MiniSSC@{Zebulon::MiniSSC}!SetChannelToRate@{SetChannelToRate}}
\index{SetChannelToRate@{SetChannelToRate}!Zebulon::MiniSSC@{Zebulon::MiniSSC}}
\subsubsection[{SetChannelToRate}]{\setlength{\rightskip}{0pt plus 5cm}void MiniSSC::SetChannelToRate (const unsigned int {\em channel}, \/  const bool {\em onFlag} = {\ttfamily true})}}
\label{class_zebulon_1_1_mini_s_s_c_ac433ea01c88c1c75cc9d78caf8d95ba3}


Normally when you set the value for a channel it will output that value directy (like a position). Use this method if you want this interface to use the value as a continuous rate change. For example, if your channel is set to a rate change you set a value of 50\%, then every second the position/servo channel value will increase by 50\% of MaxRateChange.


\begin{DoxyParams}{Parameters}
\item[\mbox{$\leftarrow$} {\em channel}]Channel that is outputing rate channels. \item[\mbox{$\leftarrow$} {\em onFlag}]If true, channel is changed to rate change, false for fixed values. \end{DoxyParams}
\hypertarget{class_zebulon_1_1_mini_s_s_c_a8dd7043fbecde7a71e9c2187893c5603}{
\index{Zebulon::MiniSSC@{Zebulon::MiniSSC}!SetValue@{SetValue}}
\index{SetValue@{SetValue}!Zebulon::MiniSSC@{Zebulon::MiniSSC}}
\subsubsection[{SetValue}]{\setlength{\rightskip}{0pt plus 5cm}bool MiniSSC::SetValue (const unsigned int {\em channel}, \/  const double {\em value})}}
\label{class_zebulon_1_1_mini_s_s_c_a8dd7043fbecde7a71e9c2187893c5603}


Sets the value of an output channel. 
\begin{DoxyParams}{Parameters}
\item[\mbox{$\leftarrow$} {\em channel}]Channel that is being sent a value. Values \mbox{[}0,7\mbox{]} mapped to specific output channels, values \mbox{[}8,15\mbox{]} are virtual channels used for mixing. \item[\mbox{$\leftarrow$} {\em value}]Value to be sent to the channel\mbox{[}-\/100,100\mbox{]}.\end{DoxyParams}
\begin{DoxyReturn}{Returns}
True on success, False on failure. 
\end{DoxyReturn}


The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
C:/Users/Matt/Documents/School/Robotics/zebulon/v2/minissc/include/\hyperlink{minissc_8h}{minissc.h}\item 
C:/Users/Matt/Documents/School/Robotics/zebulon/v2/minissc/src/\hyperlink{minissc_8cpp}{minissc.cpp}\end{DoxyCompactItemize}
